package cc.yugu.yhdw.webserver.persistence.basic;

import cc.yugu.yhdw.common.domain.basic.TerminalCode;
import cc.yugu.yhdw.common.persistence.MasterMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * 设备注册信息
 *
 * @Date:Created in 2018/6/29 11:22
 * @Author:
 * @Modified By: zjn 2018/6/29 11:22
 */
public interface TerminalCodeMapper extends MasterMapper {
    /**
    * 根据设备唯一码（id）查询表bas_terminal_code
    *
    * @Param: [id]
    * @Return: cc.yugu.yhdw.common.domain.basic.TerminalCode
    * @Author By: zjn 2018/6/29  11:22
    */
    public TerminalCode find(String id);
    /**
    * 根据设备号码查询
    *
    * @Param: [code]
    * @Return: cc.yugu.yhdw.common.domain.basic.TerminalCode
    * @Author By: zjn 2018/6/29  11:24
    */
    public TerminalCode findByCode(String code);
    /**
    * 查询表bas_terminal_code， 返回总行数
    *
    * @Param: [search]
    * @Return: int
    * @Author By: zjn 2018/6/29  11:25
    */
    public int findPageCount(TerminalCode search);
    /**
    * 分页查询
    *
    * @Param: [search]
    * @Return: java.util.List<cc.yugu.yhdw.common.domain.basic.TerminalCode>
    * @Author By: zjn 2018/6/29  11:25
    */
    public List<TerminalCode> findPageResult(TerminalCode search);
    /**
    * 插入数据
    *
    * @Param: [entity]
    * @Return: int
    * @Author By: zjn 2018/6/29  11:25
    */
    public int insert(TerminalCode entity);
    /**
    * 根据唯一码更新设备编号
    *
    * @Param: [id, code]
    * @Return: int
    * @Author By: zjn 2018/6/29  11:26
    */
    public int update(@Param("id") String id, @Param("code") String code);
}
